package me.cat.interfacedemo.a01interfacedemo1;

public class Test {
    public static void main(String[] args) {
        Dog d = new Dog("团团", 2);
        System.out.println(d.getName() + "," + d.getAge());
        d.eat();
        d.swim();
        Rabbit r = new Rabbit("困困", 1);
        System.out.println(r.getName() + "," + r.getAge());
        r.eat();
    }
}
